home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / lists / lrange < prev    next >
Encoding:
Text File  |  1993-10-26  |  980 b   |  23 lines  |  [TEXT/$Tcl]

  1.  
  2.           lrange list first last
  3.  
  4.  
  5.      DESCRIPTION
  6.           List must be a valid Tcl list.  This command will  return  a
  7.           new   list   consisting  of  elements  first  through  last,
  8.           inclusive.  Last may be end (or any abbreviation of  it)  to
  9.           refer  to  the  last  element of the list.  If first is less
  10.           than zero, it is treated as if it were  zero.   If  last  is
  11.           greater than or equal to the number of elements in the list,
  12.           then it is treated as if it were end.  If first  is  greater
  13.           than  last then an empty string is returned.  Note: ``lrange
  14.           list first first'' does not always produce the  same  result
  15.           as  ``lindex list first'' (although it often does for simple
  16.           fields that aren't enclosed in braces);  it  does,  however,
  17.           produce  exactly  the  same  results  as ``list [lindex list
  18.           first]''
  19.  
  20.  
  21.      KEYWORDS
  22.           element, list, range, sublist
  23.